home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0277.ZIP
/
WTF.DOC
< prev
next >
Wrap
Text File
|
1986-11-12
|
7KB
|
179 lines
Notes on "Where The F***"
=========================
Current Version : V 3.10
Dated : 07-FEB-1986
WTF is a file find program, and having found the files offers the oppertunity
to COPY, RENAME and DELEATE the origional.
The wilde cards allowed in the filespec for the search ARE NOT DOS.
ie: ? : matches ANY charictor but theere MUST be one there
* : means Ship zero or more charictors to find the next defined char.
( '.' and EOS are considers chars )
AND there is NO restriction on the number of or ordering of wild cards in the
defined filespec. The wildcard matching code will search exaustivly for
a match - see example 2 below.
Some examples:
1 : ABC*D Must start with 'ABC' AND end with 'D'
ABCD yes
ABCDD yes
ABCxDxyD yes
xABCD no
ABCDx no
2 : AB*C*D Must start with 'AB' AND must contain 'C' and must end 'D'
ABCD yes
ABxxxCxD yes
ABxCxCCD yes
ABxCxCCE no
3 : *?A Skip whatever is required to find 'Somthing'A
(at least 2 chars)
?*A 'Somthing' then skip whatever is required to leave A at end.
These rules can be modified to return all NON-MATCHING files with the -n switch
SWITCHES.
========
This page of information is output to the VDU if wtf is called with either
no or an invalid set of switch settings.
The switches and filespec can be in any order on the command line.
The switches are split into two groups those requireing further information
to fully define the switchs function and those with just an ON/OFF action.
Needing further qualifing
=========================
-y : can be used as is to cause the found files date and time of
-o : last update to be output. But can also be used to supply a
: cut off date for the search. Eg.
-y1-2-1984 : Younger than 1 Feb 1985 ( must be four fig year )
-o12-5-1986 : older than.
-c.... : copy the target for the copy must be specified. if strig is
: blank then target for the copy is the currently active drive
: path. Else it is the defined drive and path ( both parts
: optional ) If the path specified does not begin with a path
: seperator char '\' then the path is assumed to be ADDED on top
: of the currently active path of the selected drive. If the
: required path for a copy does not exist then it will be created.
: See also the -a switch (ON/OFF section). ONLY drive and path are
: allowed, if no terminating '\' is present on a path one is
: appended.
-k... : Same as for -c but files are only copied if the destination file
: does not exist OR the destination file dose exist but is OLDER
: than the source file found in the search.
-r.... : rename If a portion of the renam is absent it is taken from the
: origional ELSE it comes from the rename string. This can rename
: files accross path boundaries, but not drives !
-r\xxx\.q : will move the file to directory \xxx\ and replace the extent with
: 'q' the filename portion will remaine unchainged, since it is not
: present in the rename string.
ON/OFF
======
upbsnhd?a
u : look on all drives up to drive Y: starting with the one defined
: in the search string ( or currently active ). If no path is
: specified in the search string then the currently active path
: on each drive is the start point.
p : Use the DOS PATH= string as the drive and path portions of the
: search string.
b : causes wtf NOT to ask for permition befoure copying, renameing
: an deleating.
s : continus search through all sibling directories
n : use ony files that DO NOT MATCH
h : include System and Hidden files in the search. Hidden directories
: are automaticaly searched.
d : after finding and optionaly copying delete the origional.
? : dont actualy do it but produce the screen output anyway.
a : APPEND used to modify the target path used in the COPY option.
: it APPENDS the path of the origional the the path ( if any )
: specified in the copy string. Thus whole disks can be moved on
: top of another directory.
Search filespec.
================
Must contain AT LEAST ONE and up to three of the following.
1 : Drive name: If absent use the currenty active drive.
2 : Path, \Path If absent use the currently active path.
3 : filename;nextone;another;etc; one or more filenames
( with or without wildcards ) separated by ';' NO SPACES.
eg. wtf includes\*.h;*.c;*.asm -sab -ca:\old_ones\
is interprited as Starting at
Current Drive:Current_Path\includes\
(and continueing through all offspring subdirectories)
Find ALL files Anything.H AND
Anything.C AND
Anything.ASM
And then COPY them ( as they are found ) to
Drive A:
Subdirectory \OLD_ONES\
Appending the found files path ( from where we started looking ) to
A:\OLD_ONES\ as we go. Subdirectories will be created as required.
If at any time the target path can not be created or the copy did not compleate
then the user will be asked weather to try againe, the disk can be chainged
at this point and the path creation will start over.
General Notes for COPY.
======================
For each level in the target copy path causes DOS to read the new
directory in for EVERY file. So in order to speed things up the
copy path can start at the currently active path. However the
destination path as written to the VDU is always the FULL and
UNIQUE definition. It is possable for the same file to be accessed
and opened by DOS using diferent formes of it name, different ways
to define the same path, withput realising that it is in fact dealing
with the same physical file. WTF checks explicitly for this and will
never allow a file to be coppied to itsself.
The following page is the programs own help screen.
==================================================
Useage...
wtf [d:][[\]path\][filespec][.][ext] [-upbsanh?d] [-y/o...] [-r..] [-c..]
[d:][[\]path\]<filespec>[.ext][;file;file;...] ARE the SEARCH PATTEN(s)
Wild cards are NOT DOS eg: A*B*C*?D is allowed !.
WARNING----- This program Beats as it sweeps as it cleans !!!------
Allowed switches are
n : NOT : use NON matching files.
? : IDIOT : Produce all screen output but do nothing.
s : SIBLING : Continous search through all offspring.
p : PATH : Perform search through the DOS PATH= sequence.
u : UNIVERSAL : Perform search through ALL DISKS ON LINE from [d:].
h : HIDDEN : Search to include SYSTEM and HIDDEN files also.
a : APPEND : For copy APPEND found path to defined path.
b : BATCH : do NOT ask for permission B4 DEL, COPY or REN.
d : DELETE : when done with any of the above DELETE THE ORIGIONAL.
-c[d:][\path\]<filespec> : copy found files to this destination.
-k... : copy files only if dest file older or non existant.
-r[\path\]<filespec> : rename --------------!!-------------.
-oxx:xx:xxxx only act on files Older than date
-yxx:xx:xxxx only act on files Younger than or = date; default = -y1:1:1980